package org.zxyj.core.utils;

import java.util.List;

import org.apache.commons.collections.CollectionUtils;

/**
 * 集合类处理工具
 * @author ly
 */
public class CollectionUtil {
	public static Long[] longsListToLongs(List<Long> longList) {
        if (CollectionUtils.isNotEmpty(longList)) {
            Long[] longArray = new Long[longList.size()];
            for (int i = 0; i < longList.size(); i++) {
                longArray[i] = longList.get(i);
            }
            return longArray;
        }
        return null;
    }
	
	public static Object[] objectsListToObjects(List<Object> objList) {
        if (CollectionUtils.isNotEmpty(objList)) {
            Object[] array = new Object[objList.size()];
            array = objList.toArray(array);
            return array;
        }
        return null;
    }
}
